package com.ez.supervise.dao.impl;

import java.util.List;

import com.ez.supervise.core.Page;
import com.ez.supervise.dao.DemocracyCheckmanDao;
import com.ez.supervise.dao.base.BaseDaoImpl;
import com.ez.supervise.model.biz.DemocracyCheckman;

public class DemocracyCheckmanDaoImpl extends BaseDaoImpl implements DemocracyCheckmanDao {

    public void insert(Object democracycheckman) {
	sqlMapClientTemplate.insert("biz.insertDemocracyCheckman", democracycheckman);
    }

    public Object get(Long id) {
	return (DemocracyCheckman) sqlMapClientTemplate.queryForObject("biz.getDemocracyCheckmanById", id);
    }

    public void update(Object org) {
	sqlMapClientTemplate.update("biz.updateDemocracyCheckman", org);
    }

    public void delete(Long id) {
	sqlMapClientTemplate.update("biz.deleteDemocracyCheckman", id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.DemocracyCheckmanDao#findByCount(com.ez.supervise.core.Page)
     */
    public int findDemocracyCheckmanByCount(Page page) {
	return (Integer) getSqlMapClientTemplate().queryForObject("biz.findDemocracyCheckmanByCount", page.getConditions());
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.DemocracyCheckmanDao#findByPage(com.ez.supervise.core.Page)
     */
    public List findDemocracyCheckmanByPage(Page page) {
	return getSqlMapClientTemplate().queryForList("biz.findDemocracyCheckmanByPage", page.getConditions());
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.DemocracyCheckmanDao#findAll()
     */
    public List findAll() {
	return getSqlMapClientTemplate().queryForList("biz.findAllDemocracyCheckman");
    }

}
